
Page({
    data: {
      navtop:{},
      id:"",
      num:{},
      openid:""
    },
    gitfor(){
      wx.navigateBack({
        delta: -1
      })
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        this.setData({
            openid: getApp().globalData.openid,
            id:options.id
        })
      // 导航栏
      // 1.获取屏幕可使用宽度
      let windowWidth = wx.getSystemInfoSync().windowWidth;
      // 2.获取状态栏高度
      const statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
      //3.获取胶囊按钮位置信息
      const menuButton = wx.getMenuButtonBoundingClientRect();
      this.setData({
        navtop:menuButton.top,
      })
      const that=this
      wx.request({
        method:'POST',
        url: 'https://dj.ifankui.com/api/usr/getMsgDetails',
        header: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        data:{
          openid:this.data.openid,
          id:this.data.id,
        },
        success(res){
            that.setData({
                num:res.data.data
              })
        }
      })
    }
  })